import request from '@/utils/request'

export function getNodeTypes () {
  return request({
    url: '/api/Case/NodeJob/GetNodeTypes',
    method: 'get',
  })
}

export function getFlows (params) {
  return request({
    url: '/api/Case/NodeJob/GetFlows',
    method: 'get',
    params
  })
}

export function getNodeJobs (params) {
  return request({
    url: '/api/Case/NodeJob/GetNodeJobs',
    method: 'get',
    params
  })
}

export function addNodeJob (data) {
  return request({
    url: '/api/Case/NodeJob/AddNodeJob',
    method: 'post',
    data
  })
}

export function editNodeJob (data) {
  return request({
    url: '/api/Case/NodeJob/EditNodeJob',
    method: 'post',
    data
  })
}

export function deleteNodeJob (id) {
  return request({
    url: '/api/Case/NodeJob/DeleteNodeJob',
    method: 'get',
    params: {
      id
    }
  })
}